package com.news;

import com.maimeng.Services.CacheServiceX;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2018-01-14.
 */
@RestController
public class NewsController {

    @Autowired
    CacheServiceX cacheServiceX;
    @RequestMapping(value = "/news",method = RequestMethod.GET)
    public String getNews()
    {
        return cacheServiceX.getCache("news");
    }
}
